import random
import os

i=os.system("cls")
while 1:
    select_number = random.randint(0, 50)
    guess_number = int(input("请输入你猜测的数字(提示: 在0-50间): "))
    i=os.system("cls")
    while 1:
        if guess_number > select_number:
            guess_number = int(input(f'{guess_number} 大了，请重新输入: '))
        elif guess_number < select_number:
            guess_number = int(input(f'{guess_number} 小了，请重新输入: '))
        else:
            print('恭喜你，猜对了！')
            break
        i=os.system("cls")